<template>
  <div class="login-bar">
    <setHeader :back-fn="goback"></setHeader>
    <div class="pagecontent login_bar_container">
        <div class="login-bar__midtou">
            <i class="iconfont icon-youquanlogozhuanhuan"></i>
  		</div>
        <div class="login-bar__midlogin">
            <div class="formlogin" @submit.prevent="onBindTel">
                <div v-show="login_phoneNum">
                    <p class="please_input">请输入手机号</p>
                    <div :class="validClass($v.vLogin.phoneNumber)" class="clear login_bar_input">
                        <input maxlength="11" type="tel" class="custom" v-model="vLogin.phoneNumber" @input="$v.vLogin.phoneNumber.$touch()" placeholder="请输入手机号">
                        <label v-if="$v.vLogin.phoneNumber.$dirty && $v.vLogin.phoneNumber.$invalid" @click="clearPhoneNumber">
                            <i class="iconfont icon-guanbi"></i>
                        </label>
                    </div>
                    <div class="btn_big_red" @click="sendSms()">
                        <button>确认</button>
                    </div>
                </div>
                <div v-show="login_sms">
                    <p class="please_input">请输入验证码</p>
                    <div class="login_vcode">
                        <div class="codeNum" :class="validClass($v.code)">
                            <span>{{code[0]}}</span>
                            <span>{{code[1]}}</span>
                            <span>{{code[2]}}</span>
                            <span>{{code[3]}}</span>
                            <input type="text" maxlength="4" v-model="code" @input="$v.code.$touch()">
                        </div>
                        <p class="clear login_sms_code">
                            <span class="fl">验证码已发送至{{vLogin.phoneNumber}}</span>
                            <!-- <span class="fr">收不到验证码？</span> -->
                        </p>
                        <div class="btn_big_red login_btn_sms" @click="login" v-if="login_sure">
                            <button>确认</button>
                        </div>
                        <div class="btn_big_red login_btn_sms" v-if="isShow">
                            <button id="btn" @click="sendSms()" :disabled="contpending">{{contpending ? '重新发送 (' + count + '秒)' : '重新发送'}}</button>
                        </div>
                    </div>
                </div>
                <div v-show="login_pass">
                    <p class="please_input">请输入密码</p>
                    <div :class="validClass($v.vLogin.password)" class="clear login_bar_input">
                        <input maxlength="16" type="password" class="custom" v-model="vLogin.password" @input="$v.vLogin.password.$touch()" placeholder="请输入密码">
                        <label v-if="$v.vLogin.password.$dirty && $v.vLogin.password.$invalid" @click="clearPhoneNumber">
                            <i class="iconfont icon-guanbi"></i>
                        </label>
                        <p class="clear login_sms_code" style="padding: 0; margin-top: 0.3rem; color: #e50838;">
                            <span class="fl" @click="smsClick">验证码登陆</span>
                            <span class="fr" @click="resetClick">？忘记密码</span>
                        </p>
                    </div>
                    <div class="btn_big_red" @click="passLogin">
                        <button>确认</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 微信登录 -->
        <div class="otherLogin">
          <span>以下方式登录</span>
          <div @click="WeChatLogin"><img src="../common/images/wx1.png" height="100%" slot="icon"></div>
        </div>
        <!-- 点击微信 的 提示框 -->
        <div class="mint-msgbox-wrapper" style="position: absolute; z-index: 2011;" v-if="msgboxFlag">
          <div class="mint-msgbox y-msgbox"  >
            <div class="mint-msgbox-content y-msgbox-content">
                <div class="mint-msgbox-message y-msgbox-message">“友圈”想要打开“微信”</div> 
                <div class="mint-msgbox-input" style="display: none;">
                  <input placeholder="" type="text"> 
                  <div class="mint-msgbox-errormsg" style="visibility: hidden;"></div>
                </div>
            </div> 
            <div class="mint-msgbox-btns y-msgbox-btns">
                <button class="mint-msgbox-btn mint-msgbox-cancel" style=""  @click="msgboxFlag=false">取消</button>
                <button class="mint-msgbox-btn mint-msgbox-confirm" @click="weChatLogin2">打开</button>
            </div>
          </div>
        </div>
        <!-- 用户名不存在的提示框 -->
        <!-- <div class="y-prompt-msgbox " style="position: absolute; z-index: 2011;" v-if="promptmsgboxFlag">
          <div class="y-prompt-content">
            <div class="y-prompt-message">{{response.data.msg}}</div>
            <div class="mint-msgbox-input" >
              <input placeholder="" type="text"> 
              <div class="mint-msgbox-errormsg" style="visibility: hidden;"></div>
            </div>
          </div> 
          <div class="y-prompt-btns">
              <button class="y-msgbox-btn y-msgbox-cancelBtn" @click="promptmsgboxFlag=false">取消</button> 
              <button class="y-msgbox-btn y-msgbox-deterBtn">确定</button>
          </div>
        </div> -->
        <!-- 遮罩层 -->
        <div class="v-modal" @click="msgboxFlag=false"  style="width:100%;height:100%;background-color:#000; z-index: 10;" v-if="msgboxFlag"></div>
        <!-- 重置密码 -->
        <!-- <ViewModal :modalState.sync="viewState">
          <Reset @done="closePageModal"></Reset>
        </ViewModal> -->

    </div>
  </div>
</template>


<script>
import setHeader from '../public/setHeader.vue';
// import ViewModal from "@/components/View";
// import Reset from '../public/Reset.vue';


//安卓使用
import axios from 'axios';

import { required, minLength } from "vuelidate/lib/validators";
import { telNumPattern } from "@/class/product-validation.class";
import { Button } from 'mint-ui';

export default {
  name: "LoginPage",
  data: function() {
    return {
        vLogin: {
            phoneNumber: "",
            password: ""
        },
        code: [],
        pending: false,
        count: 60,
        contpending: false,
        login_phoneNum: true,
        login_sms: false,
        login_pass: false,
        login_sure: false,
        isShow: true,
        // viewState: false, //重置密码
        msgboxFlag:false,
        promptmsgboxFlag: false,
        aaa:'',
        identCode: '',   //id btn的变量
        identColor: '',   //id btn color的变量
    };
  },
    components: {
        setHeader,
        // Reset,
        // ViewModal,
        Button
    },
    created(){
        // let appid = new RegExp("(^| )"+'appid'+"=([^;]*)(;|$)");;

        // console.log('login进来了',appid);
    },
    mounted() {
    },
    watch: {
      code(val) {
        if(this.code.length == 4) {
            this.login_sure = true;
            this.isShow = false;
        }
      }
    },
    validations: {
        vLogin: {
            phoneNumber: {
                required,
                telNumPattern,
                minLength: minLength(11)
            },
            password: {
                required,
                minLength: minLength(6)
            }
        },
        code: {
            required,
            minLength: minLength(4)
        }
    },
    methods: {
        // 根据字段验证转换 class 状态
        validClass(data) {
            if (!data) return {};
            return {
                error: data["$dirty"] && data["$invalid"],
                success: data["$dirty"] && !data["$invalid"]
            };
        },
        //打开重置密码
        resetClick() {
            // this.viewState = true;
            this.$router.push({path:'/Reset'});
        },
        //关闭重置密码滑块
        closePageModal() {
            this.viewState = false;
        },
        //返回按钮
        goback() {
            this.login_phoneNum = true;
            this.login_sms = false;
            this.login_pass = false;
            this.$router.push({path:'/'});
        },
        /*
            * 清空手机号码
            */
        clearPhoneNumber() {
            this.vLogin.phoneNumber = "";
            this.vLogin.password = "";
        },
        //密码登录
        passLogin() {
            let that = this;
            that.$post(that.$path+'/index.php/api/formal/VerificationLogin/login',{mobile:that.vLogin.phoneNumber,password:that.vLogin.password}).then((res) => {
                if(res.code == 200) {
                        window.localStorage.setItem('access_token',res.data.access_token);
                        window.localStorage.setItem('timer', Date.now());

                        let userInfo = JSON.stringify(res.data.data);
                        window.localStorage.setItem('userInfo', userInfo);
                      //user_company_status  0是未绑定  1是已绑定  2是已有企业但未认证 3加入他人企业未通过
                      if(res.data.data.user_company_status == 1) {
                          that.$openTips({
                            text: '登录成功',
                            time: 1000
                          })
                          console.log('登录成功了');
                          that.$router.push({path: '/userCenter'});
                      }
                      else if(res.data.data.user_company_status == 2) {  
                        that.$openDialog({
                          src: require('../common/images/UI-10.png'),
                          title: '欢迎您',
                          message: '为了更好的使用本平台',
                          messagemore: '您需要绑定您目前就职或创办的企业',
                          okText: '立即绑定',
                          callback (flag) {
                            if(flag) {
                              that.$router.push({path:'/Certification'});
                            }else {
                              that.$router.push({path:'/userCenter'});
                            }   
                          }
                        });
                      }else if(res.data.data.user_company_status == 3) {
                          that.$openDialog({
                            src: require('../common/images/UI-10.png'),
                            title: '登录成功',
                            message: '请等待审核完成',
                            okText: '完成',
                            callback (flag) {
                              if(flag) {
                                that.$router.push({path:'/userCenter'});
                              }else {
                                that.$router.push({path:'/userCenter'});
                              }  
                            }
                        });
                      }
                      else if(res.data.data.user_company_status == 0 || res.data.data.user_company_status == ''){
                          console.log('哦租金');
                        that.$openDialog({
                          src: require('../common/images/UI-10.png'),
                          title: '欢迎您',
                          message: '为了更好的使用本平台',
                          messagemore: '您需要绑定您目前就职或创办的企业',
                          okText: '立即绑定',
                          cancelText: '暂时跳过',
                          callback (flag) {
                              if(flag){
                                  console.log('11111',flag);
                                that.$router.replace({path:'/companyCreate'});
                              }else{
                                  console.log('22222',flag);
                                that.$router.replace({path:'/userCenter'});
                              }     
                          }
                        });
                      }
                }else{ 
                    that.$openTips({
                        text: res.msg,
                        time: 2000
                    })
                    return false;
                }
            })
        },
        // 验证码注册、登录
        login() {
            let that = this;
            
            let login_style = window.localStorage.getItem('login_style');
            if(login_style == 'register') {
                that.$post(that.$path+'/index.php/api/formal/VerificationLogin/register',{mobile:that.vLogin.phoneNumber,captcha:that.code}).then((res) => {
                    console.log('验证码', res)
                    if(res.code == 200) {

                        window.localStorage.setItem('access_token',res.data.access_token);
                        window.localStorage.setItem('timer', Date.now());
                        
                        let userInfo = JSON.stringify(res.data.data);
                        window.localStorage.setItem('userInfo', userInfo);

                        that.$openDialog({
                            src: require('../common/images/UI-10.png'),
                            title: '欢迎您',
                            message: '为了更好的使用本平台',
                            messagemore: '您需要绑定您目前就职或创办的企业',
                            okText: '立即绑定',
                            cancelText: '稍后绑定',
                            callback (flag) {
                                console.log(flag);
                                if(flag == undefined || flag == false){
                                    that.$router.push({path:'/userCenter'});
                                }else{
                                    that.$router.push({path:'/companyCreate'});
                                }
                                
                            }
                        });
                    }else {
                        that.$openTips({
                            text: res.msg,
                            time: 2000
                        })
                    }
                })
            }
            else if(login_style == 'login') {
                that.$post(that.$path+'/index.php/api/formal/VerificationLogin/login',{mobile:that.vLogin.phoneNumber,captcha:that.code}).then((response) => {
                    console.log('登录信息',response);
                    if(response.code == 200) {

                        window.localStorage.setItem('access_token',response.data.access_token);
                        window.localStorage.setItem('timer', Date.now());

                        let userInfo = JSON.stringify(response.data.data);
                        window.localStorage.setItem('userInfo', userInfo);

                        //user_company_status  0是未绑定  1是已绑定  2是已有企业但未认证 3加入他人企业未通过
                        if(response.data.data.user_company_status == 1) {
                            that.$openTips({
                              text: '登录成功',
                              time: 1000
                            })
                            
                            that.$router.push({path:'/userCenter'});
                        }
                        else if(response.data.data.user_company_status == 2) {
                          that.$openDialog({
                            src: require('../common/images/UI-10.png'),
                            title: '欢迎您',
                            message: '为了更好的使用本平台',
                            messagemore: '您需要绑定您目前就职或创办的企业',
                            okText: '立即绑定',
                            callback (flag) {
                              if(flag) {
                                that.$router.push({path:'/Certification'});
                              }else {
                                that.$router.push({path:'/userCenter'});
                              } 
                            }
                          });
                          
                        }else if(response.data.data.user_company_status == 3) {
                            that.$openDialog({
                                src: require('../common/images/UI-10.png'),
                                title: '登录成功',
                                message: '请等待审核完成',
                                okText: '完成',
                                callback (flag) {
                                    if(flag) {
                                        that.$router.push({path:'/userCenter'});
                                    }  
                                }
                            });
                        }
                        else {
                          that.$openDialog({
                            src: require('../common/images/UI-10.png'),
                            title: '欢迎您',
                            message: '为了更好的使用本平台',
                            messagemore: '您需要绑定您目前就职或创办的企业',
                            okText: '立即绑定',
                            cancelText: '暂时跳过',
                            callback (flag) {
                                if(flag) {
                                  that.$router.push({path:'/companyCreate'});
                                }else {
                                  that.$router.push({path:'/userCenter'});
                                }     
                            }
                          });
                        }
                    }else{ 
                        this.$openTips({
                            text: response.msg,
                            time: 2000
                        })
                        return false;
                    }
                })
            }
        },
        // 发送验证码
        sendSms(pass,sms) {
            console.log('窗台',this.contpending);
            let that = this;
            if (that.vLogin.phoneNumber == "") {
                that.$openTips({
                    text: "手机号码不能为空！",
                    time: 1000
                });
                return;
            }
            if (!/^1[3456789]\d{9}$/.test(that.vLogin.phoneNumber)) {
                that.$openTips({
                    text: "电话号码格式错误",
                    time:1000
                });
                return;
            }

            that.$post(that.$path+'/index.php/api/formal/EntranceLogin',{mobile:that.vLogin.phoneNumber}).then((response) => {
                // login_style 当前账号状态 login为账号已存在要去登录页 register为账号不存在去注册
                if(response.code == 200){ 
                    window.localStorage.setItem('login_style', response.data.login_style);
                    window.localStorage.setItem('mobile', that.vLogin.phoneNumber);

                    // console.log('来了老哥',that.vLogin.phoneNumber);
                    if(response.data.login_style == 'login') {
                        if(that.aaa == 1){
                            that.login_phoneNum = false;
                            that.login_pass = false;
                            that.login_sure = false;
                            that.login_sms = true;
                            that.isShow = true;
                            that.aaa = 1;
                            that.$fetch(that.$path+'/index.php/api/v2/SMS/'+that.vLogin.phoneNumber+'/login').then((res) => {
                            
                            })
                        }else{
                            that.login_phoneNum = false;
                            that.login_pass = true;
                            that.login_sure = false;
                            that.aaa = 2;
                        }
                        
                        // if(that.smsState == 1) {
                        //     that.login_phoneNum = false;
                        //     that.login_pass = true;
                        //     that.login_sure = false;
                        //     that.smsState = 1;
                        // }else if(that.smsState == 2) {
                        //     that.login_phoneNum = false;
                        //     that.login_pass = false;
                        //     that.login_sure = false;
                        //     that.login_sms = true;
                        //     that.smsState = 2;
                        // }
                    }else if(response.data.login_style == 'register') {
                        that.$nextTick(() => {
                            that.aaa = 1;
                            that.contpending = true;
                            if (that.pending) return;
                            that.pending = true;
                            let timer = null,
                                count = 60;
                            clearInterval(timer);
                            timer = setInterval(_ => {
                                if (count <= 0) {
                                    that.contpending = false;
                                    that.pending = false;
                                    clearInterval(timer);
                                    that.count = count = 60;
                                    that.identCode = document.getElementById('btn').style.backgroundColor;
                                    that.identCode = "#e50838";
                                    that.identColor = document.getElementById('btn').style.color;
                                    that.identColor="#fff";
                                } else {
                                    --count;
                                    that.identCode = "#d8d8d8";
                                    that.identColor="#fff";
                                    that.count = count;
                                }
                            }, 1000);
                        })
                        that.$fetch(that.$path+'/index.php/api/v2/SMS/'+that.vLogin.phoneNumber+'/register').then((res) => {
                            
                        })
                        that.login_phoneNum = false;
                        that.login_sms = true;
                    }
                }             
                // that.$store.commit('setPage', 2);//设置需要预请求的参数
            })

        },
        // 其他方式登录 微信登录
        WeChatLogin(){
            this.verificationWechat();
           // this.msgboxFlag=true;            
        },
        verificationWechat(){
            var ua = navigator.userAgent.toLowerCase();
        　　  var isWeixin = ua.indexOf('micromessenger') != -1;
            if (isWeixin) {  //微信
                this.weChatLogin2();
            }else{
                this.msgboxFlag=true; 
                // alert('请在微信浏览器打开');
            }
        },
        //唤起微信登陆
        weChatLogin2(){
            var ua = navigator.userAgent.toLowerCase();
        　　  var isWeixin = ua.indexOf('micromessenger') != -1;
        　　  if (isWeixin) {  //微信
                var rollUrl = window.location.protocol + '//' + window.location.host + '/authorization';
                console.log('rollUrl',rollUrl);
                this.$fetch(this.$path+'/index.php/api/v2/getcode',encodeURIComponent(rollUrl)).then((res) => {
                  console.log('wechat',res); 
                    if(res) {
                        window.location.href= res;   //判断是否授权
                        // console.log('res',res);
                    }         
                })

        　　  }else{          //安卓
                this.WechatAndroid();
        　　  }

           
        // navigator.notification.alert("未安装微信APP,请下载该应用");
        // let userAgent = navigator.userAgent;
        // console.log(userAgent)
        },

        //安卓登录
        WechatAndroid() {   
                let that = this;
                Wechat.isInstalled(function (installed) {
                    if(!installed)
                    {
                        navigator.notification.alert("未安装微信APP,请下载该应用");
                        return ;
                    }else{
                        var scope = "snsapi_userinfo",
                            state = "_" + (+new Date());
                        Wechat.auth(
                            scope, 
                            state, 
                             function (response) {
                                // you may use response.co de to get the access token.
                                //navigator.notification.alert(JSON.stringify(response.code));
                                var getuser = this.$path + '/index.php/api/v2/getuser/'+response.code;
                                window.localStorage.setItem('AndroidCode',response.code);  //存储微信安卓code
                                //navigator.notification.alert(getuser);
                                axios.get(getuser)
                                .then(response => {
                                    //navigator.notification.alert(response.data);
                                    // this.openid = response.data.openid;
                                    // this.unionid = response.data.unionid;
                                    var openid = response.data.openid;
                                    var unionid = response.data.unionid;
                                    window.localStorage.setItem('openid', openid);
                                    window.localStorage.setItem('unionid', unionid);
                                    
                                    if(openid){
                                        // navigator.notification.alert('openid:'+ openid);
                                        var getuserstatus = this.$path + '/index.php/api/formal/EntranceLogin';
                                        var StatusParams = new URLSearchParams();
                                        StatusParams.append('openid',openid);
                                        axios.post(getuserstatus,StatusParams)
                                        .then(response => {
                                            //navigator.notification.alert('进来这里了！POST方法');
                                            //navigator.notification.alert(response.data.data.login_style);
                                            var login_style = response.data.data.login_style;
                                            if(login_style == 'login'){ 
                                                let openidstatus = 3;
                                                 that.$post(that.$path+'/index.php/api/formal/VerificationLogin/login',{openid,openidstatus}).then((response) => {
                                                          if(response.code == 200) {
                                                              window.localStorage.setItem('access_token',response.data.access_token);
                                                              window.localStorage.setItem('timer', Date.now());

                                                              let userInfo = JSON.stringify(response.data.data);
                                                              window.localStorage.setItem('userInfo', userInfo);

                                                              //user_company_status  0是未绑定  1是已绑定  2是已有企业但未认证 3加入他人企业未通过
                                                              if(response.data.data.user_company_status == 1) {
                                                                  that.$openTips({
                                                                    text: '登录成功',
                                                                    time: 1000
                                                                  })
                                                                  that.$router.push({path:'/userCenter'});
                                                              }
                                                              else if(response.data.data.user_company_status == 2) {
                                                                that.$openDialog({
                                                                  src: require('../common/images/UI-10.png'),
                                                                  title: '欢迎您',
                                                                  message: '为了更好的使用本平台',
                                                                  messagemore: '您需要绑定您目前就职或创办的企业',
                                                                  okText: '立即绑定',
                                                                  callback (flag) {
                                                                    if(flag) {
                                                                      that.$router.push({path:'/Certification'});
                                                                    }else {
                                                                      that.$router.push({path:'/userCenter'});
                                                                    } 
                                                                  }
                                                                });
                                                              }else if(response.data.data.user_company_status == 3) {
                                                                  that.$openDialog({
                                                                      src: require('../common/images/UI-10.png'),
                                                                      title: '登录成功',
                                                                      message: '请等待审核完成',
                                                                      okText: '完成',
                                                                      callback (flag) {
                                                                          if(flag) {
                                                                              that.$router.push({path:'/userCenter'});
                                                                          }  
                                                                      }
                                                                  });
                                                              }else if(response.data.exist == '') {
                                                                   that.$router.push({path:'/bingIphone'});
                                                              }else {
                                                                that.$openDialog({
                                                                  src: require('../common/images/UI-10.png'),
                                                                  title: '欢迎您',
                                                                  message: '为了更好的使用本平台',
                                                                  messagemore: '您需要绑定您目前就职或创办的企业',
                                                                  okText: '立即绑定',
                                                                  cancelText: '暂时跳过',
                                                                  callback (flag) {
                                                                      if(flag) {
                                                                        that.$router.push({path:'/companyCreate'});
                                                                      }else {
                                                                        that.$router.push({path:'/userCenter'});
                                                                      }     
                                                                  }
                                                                });
                                                              }



                                                          }else{ 
                                                              this.$openTips({
                                                                  text: response.data.msg,
                                                                  time: 2000
                                                              })
                                                              return false;
                                                          }
                                                      })

                                                //navigator.notification.alert('判断状态login');
                                            }else if(login_style == 'register'){ 


                                                // navigator.notification.alert('判断状态register');
                                                // navigator.notification.alert('路由:',that.$router);
                                                // navigator.notification.alert('this:',this);
                                                
                                                that.$router.push({path:'/bingIphone'});
                                            }

                                        }, err => {
                                            navigator.notification.alert('进来这里了！err');
                                            navigator.notification.alert(err)
                                        })
                                       
                                    }else{ 
                                        navigator.notification.alert('没有openid');
                                    }
                                    
                                    
                                },err =>{
                                    navigator.notification.alert('走到get错误来了');
                                    navigator.notification.alert(err)
                                })
                                //navigator.notification.alert("走了");
                            }, 
                            function (reason) {
                                navigator.notification.alert('走到get错误来了');
                                navigator.notification.alert("Failed: " + reason);
                            }
                        );
                    }

                }, function (reason) {
                    navigator.notification.alert("Failed: " + reason);
                });

        },
        
        //验证码登录
        smsClick() {
            // this.$router.push({path:'/smsLogin'});
            let that = this;
            that.login_sms = true;
            that.login_phoneNum = false;
            that.login_pass = false;
            that.aaa = 1;
            that.$nextTick(() => {
                that.contpending = true;
                that.pending = true;
                if (!that.pending) return;
                let timer = null,
                    count = 60;
                clearInterval(timer);
                timer = setInterval(_ => {
                    if (count <= 0) {
                        this.contpending = false;
                        this.pending = false;
                        clearInterval(timer);
                        this.count = count = 60;
                        that.identCode = document.getElementById('btn').style.backgroundColor;
                        that.identCode="#e50838"
                        that.identColor = document.getElementById('btn').style.color;
                        that.identColor="#fff";
                    } else {
                        --count;
                        that.identCode="#d8d8d8"
                        that.identColor="#fff";
                        this.count = count;
                    }
                }, 1000);
            })
            that.$fetch(that.$path+'/index.php/api/v2/SMS/'+that.vLogin.phoneNumber+'/login').then((res) => {
                console.log('房屋内', res);      
            })
        },
    },
}
</script>

<style>

.login-bar__midlogin .formlogin .login_bar_input.error {
    border-bottom: 1px solid #e50838;
}
.login-bar__midlogin .formlogin .login_vcode .error {
    border-bottom: 1px solid #e50838;
}
/* 头部颜色为白色 */
.login-bar .header_array_text_white {
  background-color: #fff;
  color: #333;
}
/* 中部居中 */
.login_bar_container {
    padding: 0.7rem 0.5rem 0.3rem;
    background-color: #fff !important;
    box-sizing: border-box;
}
/* logo */
.login-bar__midtou .icon-youquanlogozhuanhuan {
    font-size: 1.1rem !important;
    margin-bottom: 0.7rem;
    color: #e50838;
    display: inline-block;
}

/* 表单 */
.login-bar__midlogin .formlogin .please_input {
    font-size: 0.26rem;
    color: #e50838;
    margin: -0.5rem 0 0.7rem 0;
    line-height: 0.46rem;
    text-align: center;
}
.login-bar__midlogin .formlogin .login_bar_input {
    height: 1rem;
    border-bottom: 1px solid #d8d8d8;
    line-height: 1px;
    text-align: left;
}
.login-bar__midlogin .formlogin .login_bar_input input {
    font-size: 0.26rem;
    color: #333;
    line-height: 1rem;
    width: 88%;
    padding: 0 0.2rem;
}
.login-bar__midlogin .formlogin .login_bar_input label .icon-guanbi {
    color: #999;
    font-size: 0.48rem;
    display: inline-block;
    vertical-align: middle;
}
.login_bar_input {
    margin-bottom: 0.9rem;;
}

/* 验证码 */
.login_vcode {
    margin: 0 -1rem;
    box-sizing: border-box;
}
.login-bar__midlogin .formlogin .codeNum {
    width: 74%;
    margin: 0 auto;
    position: relative;
    text-align: center;
    border-bottom: 1px solid #d8d8d8;
    padding-bottom: 0.4rem;
    line-height: 0.8rem;
    box-sizing: border-box;
}
.login-bar__midlogin .formlogin .codeNum span {
    background-color: rgba(245, 245, 245, 1);
    display: inline-block;
    width: .8rem;
    height: .8rem;
    margin-left: .1rem;
    text-align: center;
    vertical-align: bottom;
    line-height: .8rem;
    border-radius: 2px;
    font-size: 0.6rem;
    margin: 0 0.198rem;
}
.login-bar__midlogin .formlogin .codeNum input{
    position: absolute;
    min-width: 72%;
    letter-spacing: 1.3rem;
    color: transparent;
    left: 0.36rem;
    height: .8rem;
    padding: 0;
    -webkit-transform: translate(12%);
    transform: translate(12%);
}
.login_btn_sms #btn {
    margin-top: 0.9rem;
    background-color: #d8d8d8;
}
.login_btn_sms button {
    background-color: #e50838;
    margin-top: 0.9rem;
}
.login_sms_code {
    font-size: 0.22rem;
    color: #c6c6c6;
    padding: 0.14rem 1.2rem 0;
}
.login_sms_code a {
    font-size: 0.22rem;
}

/* 微信登录 */
.otherLogin{
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}
.otherLogin span{
  color:#c6c6c6;
  font-size: 0.22rem ;
  display: block;
  margin-top: 1.16rem ;
  margin-bottom: 0.5rem ;
  position: relative ;
}
.otherLogin span:after{
  position: absolute ;
  right: 0.8rem;
  top:0.15rem;
   content: "";
   clear: both;
   display: block;
   height: 0.02rem ;
   width: 1rem ;
   background:rgba(244,245,247,1);
}
.otherLogin span:before {
  position: absolute ;
    left: 0.8rem;
    top: 0.15rem;
   content: "";
   clear: both;
   display: block;
   height: 0.02rem ;
   width: 1rem ;
   background:rgba(244,245,247,1);
}
.otherLogin>div{
  margin : 0 auto ;
  width:0.8rem ;
  height:0.8rem ;
  background:rgba(244,245,247,1);
  border-radius:50%;
  display:flex ;
  justify-content: center;
  align-items: center;
}
.otherLogin>div img{
  width: 70% ;
  height: 70% ;
}

</style>


